home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group00a.txt
/
000155_icon-group-sender _Fri Jun 23 08:15:13 2000.msg
< prev
next >
Wrap
Internet Message Format
|
2001-01-03
|
2KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id IAA11792
for icon-group-addresses; Fri, 23 Jun 2000 08:15:03 -0700 (MST)
Message-Id: <200006231515.IAA11792@baskerville.CS.Arizona.EDU>
Date: Fri, 23 Jun 2000 07:57:52 -0700
From: Steve Wampler <swampler@noao.edu>
X-Accept-Language: en
To: icon-group <icon-group@optima.CS.Arizona.EDU>, jsampson@indexes.u-net.com
Subject: Re: Error messages
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
"J.R. Sampson" wrote:
> I had an error message 114, 'Invalid type to subscript operation'
> which I eventually traced to the fact that I had typed square
> brackets where there should have been parens. However, the
> phrase quoted doesn't make sense to me as it stands. What I had
> done was to write, in effect, 'foo := set[bar]' - perhaps if I don't
> make sense to the compiler I can't expect it to make sense to me!
> It is really a syntax error.
Actually, no - it's not a syntax error. Function names are not
reserved names, but simply global variables with predefined values.
Somewhere earlier (in the execution of the program) you may have
done:
set := table()
and then the line
foo := set[bar]
makes complete sense. (This type of language flexibility does
make it difficult to produce error messages that always make
sense to the user, who may be thinking of something entirely
different - which is why having a traceback that includes line
numbers is so useful!)
--
Steve Wampler- SOLIS Project, National Solar Observatory
swampler@noao.edu